// ABP通用类型定义

// ABP分页请求参数
export interface AbpPagedParams {
  skipCount?: number;
  maxResultCount?: number;
  sorting?: string;
}

// ABP分页结果
export interface AbpPagedResult<T> {
  totalCount: number;
  items: T[];
}

// ABP应用配置
export interface AbpApplicationConfiguration {
  localization: {
    languages: AbpLanguageInfo[];
    values: Record<string, Record<string, string>>;
  };
  auth: {
    grantedPolicies: Record<string, boolean>;
    policies: Record<string, boolean>;
  };
  setting: {
    values: Record<string, string>;
  };
  currentUser: AbpUserInfo;
  features: {
    values: Record<string, string>;
  };
  multiTenancy: {
    isEnabled: boolean;
    tenantResolveResult?: {
      name?: string;
      tenantId?: string;
    };
  };
}

// ABP语言信息
export interface AbpLanguageInfo {
  cultureName: string;
  uiCultureName: string;
  displayName: string;
  flagIcon: string;
}

// ABP用户信息
export interface AbpUserInfo {
  isAuthenticated: boolean;
  id?: string;
  tenantId?: string;
  userName?: string;
  name?: string;
  surName?: string;
  email?: string;
  emailVerified: boolean;
  phoneNumber?: string;
  phoneNumberVerified: boolean;
  roles: string[];
}

// 登录请求参数
export interface LoginParams {
  userNameOrEmailAddress: string;
  password: string;
  rememberMe?: boolean;
}

// 登录结果
export interface LoginResult {
  accessToken: string;
  encryptedAccessToken: string;
  expireInSeconds: number;
  requiresTwoFactor: boolean;
}

// 新的登录请求参数接口 (根据用户提供)
export interface ReqLogin {
  username?: string;
  password?: string;
}
